<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>考试记录</title>
		<meta name="renderer" content="webkit">
		<link rel="stylesheet" href="layui/css/layui%20-%20副本.css" media="all">
		<link rel="shortcut icon" href="img/logo.png" />
		<link rel="stylesheet" type="text/css" href="./css/learn-HomePage/learn-homePage.css"/>
		<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
		<script src="layui/layui.js" charset="utf-8"></script>
		<!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
		<script src="jquery/jquery-1.11.3.min.js" charset="UTF-8"></script>
		<style type="text/css">
			.layui-col-md10 {
				margin-top: 50px;
				width: 1130px;
				/* height: 500px; */
				border: 1px solid white;
				box-shadow: -moz-box-shadow:0 0 10px #ebeef5;
				-webkit-box-shadow: 0 0 10px #ebeef5;
				box-shadow: 0 0 10px #ebeef5;
			}

			.shadow {}

			th {
				background-color: white;
				border-bottom: 3px solid #ebeef5;
			}

			td {
				border-bottom: 1px solid #ebeef5;
			}
		</style>
	</head>
	<body>
		<div class="layui-row layui-header" style="border-bottom: 1px solid red;">
			<header>
				<a name="dbl"></a>
				<div class="dbl">
					<div>
						<img src="img/learn-HomePage-img/farbnf.png" class="logo"/>
					</div>
					<div>
						<ul>
							<li id="a">
								<div class="one"  style="height: 50px; width: 50px;">
									<img src="img/learn-HomePage-img/3.png" class="tx" id="show"  />
								</div>
								<ul id="erji" class="erji">
									<li><a href="learn_Personal.html">个人中心</a></li>
									<li><a href="javascript:;"><span onclick="clos()">退出</span></a></li>
								</ul>
							</li>
							<li id="a"><a href="learn_WrongBook.html">错题本</a></li>
							<li id="a"><a href="learn-Testrecords.html">考试记录</a></li>
							<li id="a"><a href="learn-Testcenter.html">试卷中心</a></li>
							<li id="a"><a href="learn_IntelligentTraining.html">智能训练</a></li>
							<li id="a"><a href="learn-VideoClass.html">视频课堂</a></li>
							<li id="a"><a href="learn-Homepage.html">首页</a></li>
						</ul>
					</div>
					
				</div>
				
			</header>
		</div>
		<div class="layui-row">
			<div class="layui-col-md2">
				&nbsp;
			</div>
			<div class="layui-col-md10">
				<table class="layui-hide" id="test" lay-filter="test"></table>
				<script type="text/html" id="zizeng">
				{{d.LAY_TABLE_INDEX+1}}
				</script>
				<script type="text/html" id="barDemo">
					<a class="layui-btn layui-btn-xs" lay-event="action" style="background-color: #1e9fff;">查看试卷</a>
				</script>
				<script type="text/html" id="barzt">
					
				</script>
				<script>
					layui.use('table', function() {
						var table = layui.table;
						$(function() {
							// //获取上个页面拼接的参数
							// var path = window.location.search;
							// //数组获取等号右边数
							// var array = path.split("=");
							// alert(array[1])
							$.ajax({
								url: 'http://localhost:8081/studentPaper/getRedis',
								async: false,
								type: "post",
								dataType: "json",
								success: function(data) {
									var item = data.data;
									for (var i = 0; i < item.length; i++) {
										var spUserId = item[i].userId;
									}
									var spUserId = spUserId;
									table.render({
										elem: '#test',
										url: 'http://localhost:8081/studentPaper/selStudentTestrecords?spUserId=' +
											spUserId + '',
										cols: [
											[{
													field: 'zizeng',
													width: 120,
													title: '序号',
													templet: '#zizeng'
												},
												{
													field: 'spName',
													width: 400,
													title: '名称'
												},
												{
													field: 'subjectName',
													width: 140,
													title: '学科'
												},
												{
													field: 'spCorrectStatus',
													width: 120,
													// toolbar: '#barzt',
													title: '状态'
												}, {
													field: 'spSubmitTime',
													width: 200,
													title: '做题时间'
												}, {
													fixed: 'right',
													title: '',
													toolbar: '#barDemo',
													width: 100
												}
											]
										],
										page: true,
										height: 480,
										
										done: function (res, curr, count) {
										$("[data-field='spCorrectStatus']").children().each(function () {
												 if ($(this).text() == '0') {
													 $(this).text("未批改")
												 }else if($(this).text() == '1'){
													 $(this).text("完成")
												 } 
											});
										}
										
										
									});
									//监听行工具事件
									  table.on('tool(test)', function(obj){
									    var data = obj.data;
									    if (obj.event === 'action') {
											window.open("learn-SelTest.html");
									    }
									});
								},
							})
						})
					});
					 
				</script>
			</div>
		</div>
		<footer>
			<div>
				<ul class="foter" style="width: 100%; ">
					<li>
						<p style="font-size: 20px;">产品介绍</p>
						<br>
						<p><a href="https://www.mindskip.net/sdd.html">思多多智能考试平台</a></p>
						<p><a href="https://www.mindskip.net/wdd.html">维多多培训考试系统</a></p>
						<p><a href="https://www.mindskip.net/xdd.html">学多多考试系统</a></p>
						<p><a href="https://www.mindskip.net/xzs.html">学致死考试系统</a></p>
					</li>
					
					<li>
						<p style="font-size: 20px;">跃考 H5、小程序</p>
						<img src="img/learn-HomePage-img/foewm.PNG" style="width: 90%;"/>
					</li>
					<li>
						<p style="font-size: 20px;">维考 H5、小程序</p>
						<img src="img/learn-HomePage-img/wk.PNG" style="width: 90%;"/>
					</li>
					<li>
						<p style="font-size: 20px;">学多多小程序</p>
						<img src="img/learn-HomePage-img/xdd.PNG" style="width: 90%;"/>
					</li>
					<li>
						<p style="font-size: 20px;">关于我们</p>
						<img src="img/learn-HomePage-img/gywm.PNG" style="width: 90%;"/>
					</li>
					<li style="float: right;">
						<p style="font-size: 20px;">开源社区</p>
						<a href="https://github.com/mindskip/xzs"><img src="img/learn-HomePage-img/gywm1.PNG" style="width: 40%;"/></a>
						<a href="https://gitee.com/mindskip/uexam"><img src="img/learn-HomePage-img/kysq2.PNG" style="width: 40%;"/></a>
					</li>
					<div style="clear: both;"></div>
				</ul>
				
			</div>
			
			
		</footer>
		<script>
			var show = document.getElementById("show")
			var erji1 = document.getElementById("erji");
			show.onclick = function(){
				if(erji1.style.display=="none"){
					erji1.style.display="block";
					// erji1.style.z-index="5"
				}else{
					erji1.style.display="none";
					
					 // z-index:999
				}
			}
			//退出
			function clos(){
				 if(confirm("您确定要退出本系统吗？")){
					$.ajax({
						type:"POST",
						url:"http://localhost:8081/infomation/logout",
						dataType:"text",
						// async:false,
						success:function(data){
							if(data=="200"){
								alert("退出成功");
								window.location.href = "student_login.html";
							}else{
								alert("退出失败");
							}
						}
					})
				}
			};
		</script>
	</body>
</html>
